Optimal. Leaf size=279 \[ \frac{(a+b \sec (c+d x))^{n+1} \text{Hypergeometric2F1}\left (1,n+1,n+2,\frac{a+b \sec (c+d x)}{a-b}\right )}{2 d (n+1) (a-b)}+\frac{(a+b \sec (c+d x))^{n+1} \text{Hypergeometric2F1}\left (1,n+1,n+2,\frac{a+b \sec (c+d x)}{a+b}\right )}{2 d (n+1) (a+b)}-\frac{(a+b \sec (c+d x))^{n+1} \text{Hypergeometric2F1}\left (1,n+1,n+2,\frac{b \sec (c+d x)}{a}+1\right )}{a d (n+1)}-\frac{b (a+b \sec (c+d x))^{n+1} \text{Hypergeometric2F1}\left (2,n+1,n+2,\frac{a+b \sec (c+d x)}{a-b}\right )}{4 d (n+1) (a-b)^2}+\frac{b (a+b \sec (c+d x))^{n+1} \text{Hypergeometric2F1}\left (2,n+1,n+2,\frac{a+b \sec (c+d x)}{a+b}\right )}{4 d (n+1) (a+b)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.230759, antiderivative size = 279, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {3885, 961, 68, 65, 831} \[ \frac{(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac{a+b \sec (c+d x)}{a-b}\right )}{2 d (n+1) (a-b)}+\frac{(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac{a+b \sec (c+d x)}{a+b}\right )}{2 d (n+1) (a+b)}-\frac{(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac{b \sec (c+d x)}{a}+1\right )}{a d (n+1)}-\frac{b (a+b \sec (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac{a+b \sec (c+d x)}{a-b}\right )}{4 d (n+1) (a-b)^2}+\frac{b (a+b \sec (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac{a+b \sec (c+d x)}{a+b}\right )}{4 d (n+1) (a+b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3885
Rule 961
Rule 68
Rule 65
Rule 831
Rubi steps
\begin{align*} \int \cot ^3(c+d x) (a+b \sec (c+d x))^n \, dx &=\frac{b^4 \operatorname{Subst}\left (\int \frac{(a+x)^n}{x \left (b^2-x^2\right )^2} \, dx,x,b \sec (c+d x)\right )}{d}\\ &=\frac{b^4 \operatorname{Subst}\left (\int \left (\frac{(a+x)^n}{4 b^3 (b-x)^2}+\frac{(a+x)^n}{b^4 x}-\frac{(a+x)^n}{4 b^3 (b+x)^2}-\frac{x (a+x)^n}{b^4 \left (-b^2+x^2\right )}\right ) \, dx,x,b \sec (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{(a+x)^n}{x} \, dx,x,b \sec (c+d x)\right )}{d}-\frac{\operatorname{Subst}\left (\int \frac{x (a+x)^n}{-b^2+x^2} \, dx,x,b \sec (c+d x)\right )}{d}+\frac{b \operatorname{Subst}\left (\int \frac{(a+x)^n}{(b-x)^2} \, dx,x,b \sec (c+d x)\right )}{4 d}-\frac{b \operatorname{Subst}\left (\int \frac{(a+x)^n}{(b+x)^2} \, dx,x,b \sec (c+d x)\right )}{4 d}\\ &=-\frac{\, _2F_1\left (1,1+n;2+n;1+\frac{b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a d (1+n)}-\frac{b \, _2F_1\left (2,1+n;2+n;\frac{a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a-b)^2 d (1+n)}+\frac{b \, _2F_1\left (2,1+n;2+n;\frac{a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a+b)^2 d (1+n)}-\frac{\operatorname{Subst}\left (\int \left (-\frac{(a+x)^n}{2 (b-x)}+\frac{(a+x)^n}{2 (b+x)}\right ) \, dx,x,b \sec (c+d x)\right )}{d}\\ &=-\frac{\, _2F_1\left (1,1+n;2+n;1+\frac{b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a d (1+n)}-\frac{b \, _2F_1\left (2,1+n;2+n;\frac{a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a-b)^2 d (1+n)}+\frac{b \, _2F_1\left (2,1+n;2+n;\frac{a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a+b)^2 d (1+n)}+\frac{\operatorname{Subst}\left (\int \frac{(a+x)^n}{b-x} \, dx,x,b \sec (c+d x)\right )}{2 d}-\frac{\operatorname{Subst}\left (\int \frac{(a+x)^n}{b+x} \, dx,x,b \sec (c+d x)\right )}{2 d}\\ &=\frac{\, _2F_1\left (1,1+n;2+n;\frac{a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{2 (a-b) d (1+n)}+\frac{\, _2F_1\left (1,1+n;2+n;\frac{a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{2 (a+b) d (1+n)}-\frac{\, _2F_1\left (1,1+n;2+n;1+\frac{b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a d (1+n)}-\frac{b \, _2F_1\left (2,1+n;2+n;\frac{a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a-b)^2 d (1+n)}+\frac{b \, _2F_1\left (2,1+n;2+n;\frac{a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a+b)^2 d (1+n)}\\ \end{align*}
Mathematica [A] time = 6.28407, size = 256, normalized size = 0.92 \[ \frac{\cot ^2(c+d x) \left (a+b \sqrt{\sec ^2(c+d x)}\right ) (a+b \sec (c+d x))^n \left ((a-b) \left (a (a-b) (2 a-b (n-2)) \tan ^2(c+d x) \text{Hypergeometric2F1}\left (1,n+1,n+2,\frac{a+b \sqrt{\sec ^2(c+d x)}}{a+b}\right )-2 (a+b) \left (2 \left (a^2-b^2\right ) \tan ^2(c+d x) \text{Hypergeometric2F1}\left (1,n+1,n+2,\frac{b \sqrt{\sec ^2(c+d x)}}{a}+1\right )+a (n+1) \left (a-b \sqrt{\sec ^2(c+d x)}\right )\right )\right )+a (a+b)^2 (2 a+b (n-2)) \tan ^2(c+d x) \text{Hypergeometric2F1}\left (1,n+1,n+2,\frac{a+b \sqrt{\sec ^2(c+d x)}}{a-b}\right )\right )}{4 a d (n+1) (a-b)^2 (a+b)^2} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.268, size = 0, normalized size = 0. \begin{align*} \int \left ( \cot \left ( dx+c \right ) \right ) ^{3} \left ( a+b\sec \left ( dx+c \right ) \right ) ^{n}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]